package com.example.mybatisplusdemo.utils;

import com.example.mybatisplusdemo.build.UserBuilder;
import com.example.mybatisplusdemo.pl.user.po.UserPO;
import com.example.mybatisplusdemo.util.GenerateNameUtil;
import com.example.mybatisplusdemo.util.RandomUtil;
import com.example.mybatisplusdemo.util.UUIDUtil;

public class UserUtil {
    public static UserPO generateUser() {
        String id = UUIDUtil.getUUID();
        String random = RandomUtil.GenerateRandomInt(1, 3) + "";
        int age = RandomUtil.GenerateRandomInt(1, 60);
        UserPO user = UserBuilder.getBuild().setId(id)
                .setAge(age).setName(GenerateNameUtil.getChineseName())
                .setEmail(GenerateNameUtil.getEmail(11, 15))
                .setRoleId(random).build();
        return user;
    }
}
